/*
  base socket class
  kuncai
  updated by dirkcai , add buffer
*/
#ifndef SOCKET_H
#define SOCKET_H
#include <sys/socket.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>

class Socket
{
public:
	Socket();
	Socket(unsigned int fd);
	~Socket(){}
	int Read(void *buf,unsigned int nbytes);
	int Write(void *buf,unsigned int nbytes);
	int SetSocketFD(unsigned int fd);
	int GetSocketFD();
	int Close();
	virtual int IsServerSocket();

protected:
	unsigned int iSocketFD;
};
#endif
